package com.dianping.cat.consumer.transaction.model.entity;

import com.dianping.cat.consumer.transaction.model.BaseEntity;
import com.dianping.cat.consumer.transaction.model.IVisitor;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;







public class TransactionName
  extends BaseEntity<TransactionName>
{
  private String m_id;
  private long m_totalCount;
  private long m_failCount;
  private double m_failPercent;
/*  21 */   private double m_min = 8.64E7D;

/*  23 */   private double m_max = -1.0D;
  
  private double m_avg;
  
  private double m_sum;
  
  private double m_sum2;
  
  private double m_std;
  
  private String m_successMessageUrl;
  
  private String m_failMessageUrl;
  
/*  37 */   private Map<Integer, Range> m_ranges = new ConcurrentHashMap();

/*  39 */   private Map<Integer, Duration> m_durations = new ConcurrentHashMap();
  
  private double m_totalPercent;
  
  private double m_tps;
  
  private double m_line95Value;
  
  private double m_line99Value;
  
  private double m_line999Value;
  
  private double m_line90Value;
  
/*  53 */   private Map<Integer, Graph> m_graphs = new ConcurrentHashMap();

/*  55 */   private Map<Integer, AllDuration> m_allDurations = new ConcurrentHashMap();
  
  private GraphTrend m_graphTrend;
  
/*  59 */   private Map<String, StatusCode> m_statusCodes = new ConcurrentHashMap();

  
  private double m_line50Value;

  
  private double m_line9999Value;

  
  private String m_longestMessageUrl;

  
/*  71 */   public TransactionName(String id) { this.m_id = id; }




/*  76 */   public void accept(IVisitor visitor) { visitor.visitName(this); }

  
  public TransactionName addAllDuration(AllDuration allDuration) {
/*  80 */     this.m_allDurations.put(Integer.valueOf(allDuration.getValue()), allDuration);
/*  81 */     return this;
  }
  
  public TransactionName addDuration(Duration duration) {
/*  85 */     this.m_durations.put(Integer.valueOf(duration.getValue()), duration);
/*  86 */     return this;
  }
  
  public TransactionName addGraph(Graph graph) {
/*  90 */     this.m_graphs.put(Integer.valueOf(graph.getDuration()), graph);
/*  91 */     return this;
  }
  
  public TransactionName addRange(Range range) {
/*  95 */     this.m_ranges.put(Integer.valueOf(range.getValue()), range);
/*  96 */     return this;
  }
  
  public TransactionName addStatusCode(StatusCode statusCode) {
/* 100 */     this.m_statusCodes.put(statusCode.getId(), statusCode);
/* 101 */     return this;
  }

  
  public boolean equals(Object obj) {
/* 106 */     if (obj instanceof TransactionName) {
/* 107 */       TransactionName _o = (TransactionName)obj;

/* 109 */       if (!equals(getId(), _o.getId())) {
/* 110 */         return false;
      }
      
/* 113 */       return true;
    }
    
/* 116 */     return false;
  }

  
/* 120 */   public AllDuration findAllDuration(int value) { return (AllDuration)this.m_allDurations.get(Integer.valueOf(value)); }



/* 124 */   public Duration findDuration(int value) { return (Duration)this.m_durations.get(Integer.valueOf(value)); }



/* 128 */   public Graph findGraph(int duration) { return (Graph)this.m_graphs.get(Integer.valueOf(duration)); }



/* 132 */   public Range findRange(int value) { return (Range)this.m_ranges.get(Integer.valueOf(value)); }



/* 136 */   public StatusCode findStatusCode(String id) { return (StatusCode)this.m_statusCodes.get(id); }

  
  public AllDuration findOrCreateAllDuration(int value) {
/* 140 */     AllDuration allDuration = (AllDuration)this.m_allDurations.get(Integer.valueOf(value));

/* 142 */     if (allDuration == null) {
/* 143 */       synchronized (this.m_allDurations) {
/* 144 */         allDuration = (AllDuration)this.m_allDurations.get(Integer.valueOf(value));

/* 146 */         if (allDuration == null) {
/* 147 */           allDuration = new AllDuration(value);
/* 148 */           this.m_allDurations.put(Integer.valueOf(value), allDuration);
        }
      }
    }
    
/* 153 */     return allDuration;
  }
  
  public Duration findOrCreateDuration(int value) {
/* 157 */     Duration duration = (Duration)this.m_durations.get(Integer.valueOf(value));

/* 159 */     if (duration == null) {
/* 160 */       synchronized (this.m_durations) {
/* 161 */         duration = (Duration)this.m_durations.get(Integer.valueOf(value));

/* 163 */         if (duration == null) {
/* 164 */           duration = new Duration(value);
/* 165 */           this.m_durations.put(Integer.valueOf(value), duration);
        }
      }
    }
    
/* 170 */     return duration;
  }
  
  public Graph findOrCreateGraph(int duration) {
/* 174 */     Graph graph = (Graph)this.m_graphs.get(Integer.valueOf(duration));

/* 176 */     if (graph == null) {
/* 177 */       synchronized (this.m_graphs) {
/* 178 */         graph = (Graph)this.m_graphs.get(Integer.valueOf(duration));

/* 180 */         if (graph == null) {
/* 181 */           graph = new Graph(duration);
/* 182 */           this.m_graphs.put(Integer.valueOf(duration), graph);
        }
      }
    }
    
/* 187 */     return graph;
  }
  
  public Range findOrCreateRange(int value) {
/* 191 */     Range range = (Range)this.m_ranges.get(Integer.valueOf(value));

/* 193 */     if (range == null) {
/* 194 */       synchronized (this.m_ranges) {
/* 195 */         range = (Range)this.m_ranges.get(Integer.valueOf(value));

/* 197 */         if (range == null) {
/* 198 */           range = new Range(value);
/* 199 */           this.m_ranges.put(Integer.valueOf(value), range);
        }
      }
    }
    
/* 204 */     return range;
  }
  
  public StatusCode findOrCreateStatusCode(String id) {
/* 208 */     StatusCode statusCode = (StatusCode)this.m_statusCodes.get(id);

/* 210 */     if (statusCode == null) {
/* 211 */       synchronized (this.m_statusCodes) {
/* 212 */         statusCode = (StatusCode)this.m_statusCodes.get(id);

/* 214 */         if (statusCode == null) {
/* 215 */           statusCode = new StatusCode(id);
/* 216 */           this.m_statusCodes.put(id, statusCode);
        }
      }
    }
    
/* 221 */     return statusCode;
  }

  
/* 225 */   public Map<Integer, AllDuration> getAllDurations() { return this.m_allDurations; }



/* 229 */   public double getAvg() { return this.m_avg; }



/* 233 */   public Map<Integer, Duration> getDurations() { return this.m_durations; }



/* 237 */   public long getFailCount() { return this.m_failCount; }



/* 241 */   public String getFailMessageUrl() { return this.m_failMessageUrl; }



/* 245 */   public double getFailPercent() { return this.m_failPercent; }



/* 249 */   public Map<Integer, Graph> getGraphs() { return this.m_graphs; }



/* 253 */   public GraphTrend getGraphTrend() { return this.m_graphTrend; }



/* 257 */   public String getId() { return this.m_id; }



/* 261 */   public double getLine50Value() { return this.m_line50Value; }



/* 265 */   public double getLine90Value() { return this.m_line90Value; }



/* 269 */   public double getLine95Value() { return this.m_line95Value; }



/* 273 */   public double getLine9999Value() { return this.m_line9999Value; }



/* 277 */   public double getLine999Value() { return this.m_line999Value; }



/* 281 */   public double getLine99Value() { return this.m_line99Value; }



/* 285 */   public String getLongestMessageUrl() { return this.m_longestMessageUrl; }



/* 289 */   public double getMax() { return this.m_max; }



/* 293 */   public double getMin() { return this.m_min; }



/* 297 */   public Map<Integer, Range> getRanges() { return this.m_ranges; }



/* 301 */   public Map<String, StatusCode> getStatusCodes() { return this.m_statusCodes; }



/* 305 */   public double getStd() { return this.m_std; }



/* 309 */   public String getSuccessMessageUrl() { return this.m_successMessageUrl; }



/* 313 */   public double getSum() { return this.m_sum; }



/* 317 */   public double getSum2() { return this.m_sum2; }



/* 321 */   public long getTotalCount() { return this.m_totalCount; }



/* 325 */   public double getTotalPercent() { return this.m_totalPercent; }



/* 329 */   public double getTps() { return this.m_tps; }


  
  public TransactionName incFailCount() {
/* 342 */     this.m_failCount++;
/* 343 */     return this;
  }
  
  public TransactionName incFailCount(long failCount) {
/* 347 */     this.m_failCount += failCount;
/* 348 */     return this;
  }
  
  public TransactionName incTotalCount() {
/* 352 */     this.m_totalCount++;
/* 353 */     return this;
  }
  
  public TransactionName incTotalCount(long totalCount) {
/* 357 */     this.m_totalCount += totalCount;
/* 358 */     return this;
  }

  
  public void mergeAttributes(TransactionName other) {
/* 363 */     assertAttributeEquals(other, "name", "id", this.m_id, other.getId());

/* 365 */     this.m_totalCount = other.getTotalCount();

/* 367 */     this.m_failCount = other.getFailCount();

/* 369 */     this.m_failPercent = other.getFailPercent();

/* 371 */     this.m_min = other.getMin();

/* 373 */     this.m_max = other.getMax();

/* 375 */     this.m_avg = other.getAvg();

/* 377 */     this.m_sum = other.getSum();

/* 379 */     this.m_sum2 = other.getSum2();

/* 381 */     this.m_std = other.getStd();

/* 383 */     this.m_totalPercent = other.getTotalPercent();

/* 385 */     this.m_tps = other.getTps();

/* 387 */     this.m_line95Value = other.getLine95Value();

/* 389 */     this.m_line99Value = other.getLine99Value();

/* 391 */     this.m_line999Value = other.getLine999Value();

/* 393 */     this.m_line90Value = other.getLine90Value();

/* 395 */     this.m_line50Value = other.getLine50Value();

/* 397 */     this.m_line9999Value = other.getLine9999Value();
  }

  
/* 401 */   public AllDuration removeAllDuration(int value) { return (AllDuration)this.m_allDurations.remove(Integer.valueOf(value)); }



/* 405 */   public Duration removeDuration(int value) { return (Duration)this.m_durations.remove(Integer.valueOf(value)); }



/* 409 */   public Graph removeGraph(int duration) { return (Graph)this.m_graphs.remove(Integer.valueOf(duration)); }



/* 413 */   public Range removeRange(int value) { return (Range)this.m_ranges.remove(Integer.valueOf(value)); }



/* 417 */   public StatusCode removeStatusCode(String id) { return (StatusCode)this.m_statusCodes.remove(id); }

  
  public TransactionName setAvg(double avg) {
/* 421 */     this.m_avg = avg;
/* 422 */     return this;
  }
  
  public TransactionName setFailCount(long failCount) {
/* 426 */     this.m_failCount = failCount;
/* 427 */     return this;
  }
  
  public TransactionName setFailMessageUrl(String failMessageUrl) {
/* 431 */     this.m_failMessageUrl = failMessageUrl;
/* 432 */     return this;
  }
  
  public TransactionName setFailPercent(double failPercent) {
/* 436 */     this.m_failPercent = failPercent;
/* 437 */     return this;
  }
  
  public TransactionName setGraphTrend(GraphTrend graphTrend) {
/* 441 */     this.m_graphTrend = graphTrend;
/* 442 */     return this;
  }
  
  public TransactionName setId(String id) {
/* 446 */     this.m_id = id;
/* 447 */     return this;
  }
  
  public TransactionName setLine50Value(double line50Value) {
/* 451 */     this.m_line50Value = line50Value;
/* 452 */     return this;
  }
  
  public TransactionName setLine90Value(double line90Value) {
/* 456 */     this.m_line90Value = line90Value;
/* 457 */     return this;
  }
  
  public TransactionName setLine95Value(double line95Value) {
/* 461 */     this.m_line95Value = line95Value;
/* 462 */     return this;
  }
  
  public TransactionName setLine9999Value(double line9999Value) {
/* 466 */     this.m_line9999Value = line9999Value;
/* 467 */     return this;
  }
  
  public TransactionName setLine999Value(double line999Value) {
/* 471 */     this.m_line999Value = line999Value;
/* 472 */     return this;
  }
  
  public TransactionName setLine99Value(double line99Value) {
/* 476 */     this.m_line99Value = line99Value;
/* 477 */     return this;
  }
  
  public TransactionName setLongestMessageUrl(String longestMessageUrl) {
/* 481 */     this.m_longestMessageUrl = longestMessageUrl;
/* 482 */     return this;
  }
  
  public TransactionName setMax(double max) {
/* 486 */     this.m_max = max;
/* 487 */     return this;
  }
  
  public TransactionName setMin(double min) {
/* 491 */     this.m_min = min;
/* 492 */     return this;
  }
  
  public TransactionName setStd(double std) {
/* 496 */     this.m_std = std;
/* 497 */     return this;
  }
  
  public TransactionName setSuccessMessageUrl(String successMessageUrl) {
/* 501 */     this.m_successMessageUrl = successMessageUrl;
/* 502 */     return this;
  }
  
  public TransactionName setSum(double sum) {
/* 506 */     this.m_sum = sum;
/* 507 */     return this;
  }
  
  public TransactionName setSum2(double sum2) {
/* 511 */     this.m_sum2 = sum2;
/* 512 */     return this;
  }
  
  public TransactionName setTotalCount(long totalCount) {
/* 516 */     this.m_totalCount = totalCount;
/* 517 */     return this;
  }
  
  public TransactionName setTotalPercent(double totalPercent) {
/* 521 */     this.m_totalPercent = totalPercent;
/* 522 */     return this;
  }
  
  public TransactionName setTps(double tps) {
/* 526 */     this.m_tps = tps;
/* 527 */     return this;
  }
  
  public TransactionName() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/transaction/model/entity/TransactionName.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */